﻿using Jay.Sc2.Bof.Lib.State;

namespace Jay.Sc2.Bof.Lib.Action.Zerg
{
	public class ActionHarvestGasDrone : ActionHarvestGas
	{
		public static ActionHarvestGasDrone Instance = new ActionHarvestGasDrone();

		private ActionHarvestGasDrone() { }

		public override bool IsInvalid(IBuildOrder bo)
		{
			ZergState state = bo.State as ZergState;
			return base.IsInvalid(bo) || (state.Extractor.Total) * 3 <= state.WorkersOnGas;
		}

		private IAction[,] m_Requirements;
		public override IAction[,] Requirements
		{
			get
			{
				if (m_Requirements == null)
					m_Requirements = new IAction[,] { { ActionProduceExtractor.Instance } };
				return m_Requirements;
			}
		}
	}
}
